<html>
<head><meta charset="utf-8"><title>changes to backtraces · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html">changes to backtraces</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="184194530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184194530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184194530">(Dec 25 2019 at 00:09)</a>:</h4>
<p>Have there been changes to backtraces recently? I think I've got my <code>config.toml</code> right and I've rebuilt everything once or twice but my stack traces (of a ICE I've caused in libcore locally) don't have any of the compiler in them?</p>



<a name="184195621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184195621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184195621">(Dec 25 2019 at 00:51)</a>:</h4>
<p>(you can find my <code>config.toml</code> <a href="https://github.com/davidtwco/veritas/blob/master/shells/rust.nix#L13-L524" target="_blank" title="https://github.com/davidtwco/veritas/blob/master/shells/rust.nix#L13-L524">here</a>)</p>



<a name="184197478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184197478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184197478">(Dec 25 2019 at 01:57)</a>:</h4>
<p>Nuking the build directory entirely hasn't helped, still only getting this backtrace:</p>
<div class="codehilite"><pre><span></span>error: internal compiler error: src/librustc/traits/codegen/mod.rs:58: Encountered error `Unimplemented` selecting `Binder(&lt;T as num::dec2flt::rawfp::RawFloat&gt;)` during codegen

thread &#39;rustc&#39; panicked at &#39;Box&lt;Any&gt;&#39;, src/librustc_errors/lib.rs:895:9
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /home/david/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /home/david/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:77
   3: &lt;std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display&gt;::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1057
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1426
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:195
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:215
error: could not compile `core`.
</pre></div>


<p>(contents of the error aren't relevant, just the emptiness of the backtrace, this is during building the stage 1 std artifacts)</p>



<a name="184197593"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184197593" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184197593">(Dec 25 2019 at 02:01)</a>:</h4>
<p>I've never used the <code>config.toml</code> backtrace option, what happens if you also specifiy <code>RUST_BACKTRACE=1</code> or <code>RUST_BACKTRACE=full</code>?</p>



<a name="184197638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184197638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184197638">(Dec 25 2019 at 02:02)</a>:</h4>
<p>also: maybe there's a double panic happening?</p>



<a name="184197640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184197640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184197640">(Dec 25 2019 at 02:02)</a>:</h4>
<p>I would also try w/o the RUST_BACKTRACE env and paste that output</p>



<a name="184197646"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184197646" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184197646">(Dec 25 2019 at 02:03)</a>:</h4>
<p>(sometimes the panic backtracing will hide the second backtrace I think)</p>



<a name="184197936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184197936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184197936">(Dec 25 2019 at 02:12)</a>:</h4>
<p>I was using <code>RUST_BACKTRACE=1</code>, will try without tomorrow (it’s 2am here), thanks.</p>



<a name="184197944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184197944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184197944">(Dec 25 2019 at 02:13)</a>:</h4>
<p>(it sounds like a bug though -- we haven't actually changed anything here recently though to my knowledge)</p>



<a name="184211290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184211290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184211290">(Dec 25 2019 at 10:00)</a>:</h4>
<p>Omitting <code>RUST_BACKTRACE=1</code> shows no backtraces. I've recently switched to fish, I wonder if it could be something related to that? Perhaps the <code>cargo</code> invocation is getting the variable but when it runs <code>rustc</code> that isn't?</p>



<a name="184212271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184212271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184212271">(Dec 25 2019 at 10:28)</a>:</h4>
<p>No luck with <code>RUST_BACKTRACE=full</code> or commenting the <code>backtrace</code> option in <code>config.toml</code>.</p>



<a name="184212273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184212273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184212273">(Dec 25 2019 at 10:28)</a>:</h4>
<p>(or with changing how I'm setting the environment variable, though I can re-produce in bash, so ruling that out)</p>



<a name="184214506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184214506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184214506">(Dec 25 2019 at 11:41)</a>:</h4>
<p><span aria-label="confused" class="emoji emoji-1f615" role="img" title="confused">:confused:</span></p>



<a name="184214507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184214507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184214507">(Dec 25 2019 at 11:42)</a>:</h4>
<p>if you remove the <code>backtrace</code> option you are still getting backtraces but truncated?</p>



<a name="184214554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184214554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184214554">(Dec 25 2019 at 11:42)</a>:</h4>
<p>at this point I can only recommend running with <code>--verbose</code>, getting the raw invocation, and running that in gdb</p>



<a name="184214556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184214556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184214556">(Dec 25 2019 at 11:42)</a>:</h4>
<p>although with <code>--verbose</code> you only get the raw <code>cargo</code> invocation, so you'll need to run that with <code>--verbose</code> so you get the raw <code>rustc</code> invocation</p>



<a name="184215154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184215154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184215154">(Dec 25 2019 at 12:00)</a>:</h4>
<p>Yeah, only the truncated backtrace.</p>



<a name="184215217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184215217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184215217">(Dec 25 2019 at 12:01)</a>:</h4>
<p>In the past when I’ve tried to run the rustc invocation for libcore, it has depended on environment variables from cargo and so that hasn’t worked.</p>



<a name="184215220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184215220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184215220">(Dec 25 2019 at 12:01)</a>:</h4>
<p>That might have changed though, I’ll try.</p>



<a name="184218517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184218517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184218517">(Dec 25 2019 at 13:49)</a>:</h4>
<p>Yeah, running the <code>rustc</code> invocation that is printed asks for <code>RUSTC_STAGE</code>, <code>RUSTC_SYSROOT</code>, etc.</p>



<a name="184218521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184218521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184218521">(Dec 25 2019 at 13:49)</a>:</h4>
<p>(and the backtrace from that doesn't include the compiler)</p>



<a name="184219456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184219456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184219456">(Dec 25 2019 at 14:20)</a>:</h4>
<p>So, running the <code>rustc</code> from <code>./build/x86_64-unknown-linux-gnu/stage1</code> (which I'm pretty sure is the compiler I just built, and not the beta compiler - or the wrapper from bootstrap) with the same flags seems to compile correctly? Not sure why it isn't reproducing the error.</p>



<a name="184221811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184221811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184221811">(Dec 25 2019 at 15:35)</a>:</h4>
<p>Switched build directory, built an older version of my branch (before my rustfmt rebase) and it had a compiler backtrace, updated and rebuilt, no compiler backtrace. I've not changed anything that would break backtraces between those revisions. I'm able to reproduce the lack of backtrace on master, going to bisect.</p>



<a name="184221927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184221927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184221927">(Dec 25 2019 at 15:39)</a>:</h4>
<p>Starting from <a href="https://github.com/rust-lang/rust/commit/4007d4ef26eab44bdabc2b7574d032152264d3ad" target="_blank" title="https://github.com/rust-lang/rust/commit/4007d4ef26eab44bdabc2b7574d032152264d3ad">this commit</a> which was what my branch was based on pre-rebase.</p>



<a name="184227135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184227135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184227135">(Dec 25 2019 at 18:36)</a>:</h4>
<p>Results from the bisect - <a href="http://sprunge.us/ACXOa3" target="_blank" title="http://sprunge.us/ACXOa3">http://sprunge.us/ACXOa3</a></p>



<a name="184227174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184227174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184227174">(Dec 25 2019 at 18:36)</a>:</h4>
<p>Looks like a change in LLVM</p>



<a name="184227176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184227176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184227176">(Dec 25 2019 at 18:36)</a>:</h4>
<p>Not really sure how to work around that.</p>



<a name="184227853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184227853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184227853">(Dec 25 2019 at 19:01)</a>:</h4>
<p>Filed <a href="https://github.com/rust-lang/rust/issues/67615" target="_blank" title="https://github.com/rust-lang/rust/issues/67615">#67615</a> with what I've found</p>



<a name="184334192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184334192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184334192">(Dec 27 2019 at 17:47)</a>:</h4>
<p>For those following along at home, turns out this was because I had <code>debug = true</code>, any <code>debuginfo-level &gt; 1</code> will cause this.</p>



<a name="184334223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184334223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184334223">(Dec 27 2019 at 17:48)</a>:</h4>
<p>Frustratingly it changed the ICE that I had been getting, which means I hadn't actually made any progress. <span aria-label="sad" class="emoji emoji-2639" role="img" title="sad">:sad:</span></p>



<a name="184334685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/changes%20to%20backtraces/near/184334685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/changes.20to.20backtraces.html#184334685">(Dec 27 2019 at 17:57)</a>:</h4>
<p>(except it hasn't now that I'm back on my original working directory, <span aria-label="shrug" class="emoji emoji-1f937" role="img" title="shrug">:shrug:</span>)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>